import {http} from '../utils/http';


// 请求登录
export const getLogin = (data)=>{
    // let {phone,passwd} = data;
    return http({
        // url:`/login/cellphone?phone=${phone}&passwd=${passwd}`,
        url:'/login/cellphone',
        method:'GET',
        data
    })
  }

  // 二维码请求Key
  export const getQrKey = (data)=>{
    return http({
        url:'/login/qr/key',
        method:'GET',
        data
    })
  }
  // 获取二维码图片
  export const getQrImg = (data)=>{
    return http({
        url:'/login/qr/create',
        method:'GET',
        data
    })
  }
  // 检测二维码扫描状态
  export const getCheckQrState = (data)=>{
    return http({
        url:'/login/qr/check',
        method:'GET',
        data
    })
  }

  // 获取用户账户信息
  export const getUserProfile = (data)=>{
    return http({
        url:'/user/account',
        method:'GET',
        data
    })
  }

    // 手机号登录
    export const loginByPhone = (data)=>{
      return http({
          url:'/login/cellphone',
          method:'POST',
          data
      })
    }
  